import { LabelValue } from "@/type/global";

export const fieldTypeList: LabelValue[] = [
    {
        label: 'varchar',
        value: 'varchar'
    },
    {
        label: 'int',
        value: 'int'
    },
    {
        label: 'datetime',
        value: 'datetime'
    },
    {
        label: 'float',
        value: 'float'
    },
    {
        label: 'longtext',
        value: 'longtext'
    },
    {
        label: 'longblob',
        value: 'longblob'
    },
    {
        label: 'blob',
        value: 'blob'
    },
    {
        label: 'bigint',
        value: 'bigint'
    },
    {
        label: 'double',
        value: 'double'
    },
    {
        label: 'json',
        value: 'json'
    },
    {
        label: 'tinyint',
        value: 'tinyint'
    }
]

export const fieldOptions: LabelValue[] = [
    {label: '主键', value: 'primaryKey'},
    {label: '自增', value: 'autoIncrement'},
    {label: '非空', value: 'isNull'},
    {label: '索引', value: 'index'}
]

export const javaOptions: LabelValue[] = [
    {label: 'mybatis', value: 'mybatis'},
    {label: 'swagger', value: 'swagger'}
]

export const proTableOption: LabelValue[] = [
    {label: '隐藏搜索项', value: 'hideInSearch'},
    {label: '隐藏表格', value: 'hideInTable'},
    {label: '表单插槽', value: 'isSlot'},
    {label: '搜索项插槽', value: 'isFormSlot'}
]

export const proTableSearchOption: LabelValue[] = [
    {label: '下拉框', value: 'select'},
    {label: '复选框', value: 'checkbox'},
    {label: '单选按钮', value: 'radio'},
    {label: '日期', value: 'date'}
]

export const proFormOption: LabelValue[] = [
    {label: '隐藏于表单', value: 'hideInForm'},
    {label: '禁用', value: 'disabled'},
    {label: '只读', value: 'readonly'}
]

export const proFormTypeOption: LabelValue[] = [
    ...proTableSearchOption,
    {label: '上传', value: 'upload'}
]
